﻿using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Fall.Core.Extensions;
using System.Reflection;

namespace Fall.AutoMaper
{
    public static class FallAutoMapExtension
    {
        public static void AddFallAutoMapper(this IServiceCollection services, IConfiguration configuration, Assembly[] assemblies)
        {
            services.AddAutoMapper(assemblies);
            services.AutoRegisterServicesFromAssembly(typeof(FallAutoMapExtension));
        }
    }
}
